namespace ETestIT.DataAccess.Repository
{
    using System.Configuration;
    using System.Data.SqlClient;
    using Core;

    /// <summary>
    /// This is a template for creating a connection factor.  It is not 
    /// required, but it does make your life easier if you do.
    /// </summary>
    public class ConnectionFactory
    {
        internal static string _connectionString =
            ConfigurationManager.ConnectionStrings[Const.ConnectionStringName].ConnectionString;

        public static SqlConnection GetConnection()
        {
            var connection = new SqlConnection(_connectionString);
            connection.Open();

            return connection;
        }
    }
}